<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="editEmailTemplate"/></title>
<link href="<s:url value="/css/style.css"/>" rel="stylesheet" type="text/css" />
<link href="<s:url value="/css/admin.css"/>" rel="stylesheet" type="text/css" />
<script src="<s:url value="/js/jquery.js"/>" type="text/javascript"></script>
<s:include value="../common/showEditor.jsp"></s:include>
</head>
<body>
<div class="container">
	<div class="title"><s:text name="editEmailTemplate"/>
		&gt;&gt;<s:text name="%{purpose}"/></div>
	<div class="content">
		<form action="<s:url value='/admin/email-template'/>" method="post">
		<input type="hidden" name="id" value="${purpose}">
		<input type="hidden" name="redirectUrl" value="<s:url value='/admin/email-template/%{purpose.key}'/>">
			<table class="tab1">
				<tbody>
					<tr>
						<td width="80"><s:text name="templateName"/></td>
						<td>
							<input type="text" name="name"
							 value="<s:text name='%{purpose.key}'/><s:text name='emailTemplate'/>"
							 readonly="readonly" size="50">
						</td>
					</tr>
					<tr>
						<td><s:text name="emailPurpose"/></td>
						<td>
							<s:select list="purposes" listValue="%{getText(key)}" name="purpose" value="%{purpose}"
								disabled="disabled"></s:select>
						</td>
					</tr>
					<tr>
						<td><s:text name="emailReceiver"/></td>
						<td>
							<s:select list="receivers" listValue="%{getText(name())}" name="receiver" value="%{template.receiver}"></s:select>
						</td>
					</tr>
					<tr>
						<td><s:text name="emailRemark"/></td>
						<td>
							<s:text name="emailRemarkTip">
								<s:param>%{username}</s:param>
								<s:param>%{password}</s:param>
								<s:param>%{new-password}</s:param>
								<s:param>%{subscriber-title}</s:param>
								<s:param>%{subscriber-content}</s:param>
								<s:param>%{city-name}</s:param>
							</s:text>
						</td>
					</tr>
					<tr>
						<td><s:text name="thisEmailRemark"/></td>
						<td>
							<s:iterator value="purpose.variables" var="pv" status="s">
								${display}
							</s:iterator>
						</td>
					</tr>
					<tr>
						<td><s:text name="emailTitle"/></td>
						<td>
							<input type="text" name="title" value="${template.title}" size="50">
						</td>
					</tr>
					<tr>
						<td colspan="2"><s:text name="emailContent"/></td>
					</tr>
				</tbody>
			</table>
			<div class="btns">
				<textarea id="content1" style="width:100%;height:300px;" name="content">${template.content}</textarea>
				<input type="submit" value="提交" class="btn" />
				<input type="reset" value="重置" class="btn" />
			</div>
		</form>
	</div>
</div>
</body>
</html>